Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods


ODSession

Superclasses
ODObject
Subclasses
none

The ODSession class provides access to session-wide OpenDoc objects as well as the initialization and shutdown of the OpenDoc environment.

Description

When an OpenDoc document is opened, the document shell creates and initializes a single instance of ODSession. (A part editor should never create an instance of this class directly.) During its initialization, the session object creates a single object of several OpenDoc classes. These OpenDoc objects provide the environment for supporting and manipulating the document.

Through the session object, a part editor can obtain references to most of the OpenDoc objects: the arbitrator, the clipboard object, the dispatcher, the drag-and-drop object, the info object, the message interface, the name resolver, the name-space manager, the storage system, the translation object, the undo object, and the window-state object. The document shell can similarly obtain references to the binding object, the link manager, and the document shell's semantic interface.

The ODSession class also includes methods for converting between a type string (an ODType) and the corresponding token (an ODTypeToken), removing an entry from the type/token table, and accessing the name of the current user of the document. The session object also generates link update IDs, which parts use to prevent circular updating when they synchronize linked data.

For more information about type strings and tokens, see "Characters, Strings, and Tokens" (page 875). For more information about the OpenDoc objects that part editors can access, see the chapter on OpenDoc runtime features in the OpenDoc Programmer's Guide for the MacOS. For more information about linking and link update IDs, see the chapters on storage and data transfer in the OpenDoc Programmer's Guide for the MacOS.

Methods

This section presents summary descriptions of the ODSession class methods grouped according to purpose, followed by detailed descriptions in alphabetical order. Methods marked [D] are called only by the document shell or container applications.

Initializing

InitSession
Initializes this session and creates its objects.
Accessing Global Objects

GetArbitrator
Returns a reference to the arbitrator for this session.
GetBinding [D]
Returns a reference to the binding object for this session.
GetClipboard
Returns a reference to the clipboard object for this session.
GetDispatcher
Returns a reference to the dispatcher for this session.
GetDragAndDrop
Returns a reference to the drag-and-drop object for this session.
GetInfo
Returns a reference to the info object for this session.
GetLinkManager [D]
Returns a reference to the link manager for this session.
GetMessageInterface
Returns a reference to the message interface for this session.
GetNameResolver
Returns a reference to the name resolver for this session.
GetNameSpaceManager
Returns a reference to the name-space manager for this session.
AcquireShellSemtInterface [D]
Returns a reference to the document shell's semantic interface object for this session.
GetStorageSystem
Returns a reference to the storage system for this session.
GetTranslation
Returns a reference to the translation object for this session.
GetUndo
Returns a reference to the undo object for this session.
GetWindowState
Returns a reference to the window-state object for this session.
Replacing Global Objects

SetArbitrator
Replaces the arbitrator object for this session.
SetBinding
Replaces the binding object for this session.
SetClipboard
Replaces the clipboard object for this session.
SetDispatcher
Replaces the dispatcher object for this session.
SetDragAndDrop
Replaces the drag-and-drop object for this session.
SetInfo
Replaces the info object for this session.
SetLinkManager
Replaces the link manager for this session.
SetMessageInterface
Replaces the message interface for this session.
SetNameResolver
Replaces the name resolver for this session.
SetNameSpaceManager
Replaces the name-space manager for this session.
SetShellSemtInterface [D]
Replaces the document shell's semantic interface object for this session.
SetStorageSystem
Replaces the storage system object for this session.
SetTranslation
Replaces the translation object for this session.
SetUndo
Replaces the undo object for this session.
SetWindowState
Replaces the window-state object for this session.
Converting Between Type Strings and Tokens

Tokenize
Converts the specified type string to a token.
GetType
Gets the type string corresponding to the specified token, if the token exists.
RemoveEntry
Removes the specified entry from the type/token table for this session.
Miscellaneous

GetUserName
Gets a text string identifying the current user of the document.
UniqueUpdateID
Returns a new update ID that is unique to this session and unlikely to be repeated on the network.

Methods
AcquireShellSemtInterface
GetArbitrator
GetBinding
GetClipBoard
GetDispatcher
GetDragAndDrop
GetInfo
GetLinkManager
GetMessageInterface
GetNameResolver
GetNameSpaceManager
GetStorageSystem
GetTranslation
GetType
GetUndo
GetUserName
GetWindowState
InitSession
RemoveEntry
SetArbitrator
SetBinding
SetClipBoard
SetDispatcher
SetDragAndDrop
SetInfo
SetLinkManager
SetMessageInterface
SetNameResolver
SetNameSpaceManager
SetShellSemtInterface
SetStorageSystem
SetTranslation
SetUndo
SetWindowState
Tokenize
UniqueUpdateID

Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help